// 1. 导入 vue-router 包
import VueRouter from 'vue-router'


//导入 对应的 路由组件
import Homecontainer from './component/tabbar/Homecontainer.vue'
import Membercontainer from './component/tabbar/Membercontainer.vue'
import Shopcarcontainer from './component/tabbar/Shopcarcontainer.vue'
import Searchcontainer from './component/tabbar/Searchcontainer.vue'
import Newslist from './component/news/Newslist.vue'
import Newsinfo from './component/news/Newsinfo.vue'
import NewsinfoComment from './component/news/NewsInfoComment.vue'
import PhotoList from './component/photo/photoList.vue'
// 3. 创建路由对象
var router = new VueRouter({
        routes: [ //配置 路由 规则的
            { path: '/', redirect: '/home' },
            { path: '/home', component: Homecontainer },
            { path: '/member', component: Membercontainer },
            { path: '/shopcar', component: Shopcarcontainer },
            { path: '/search', component: Searchcontainer },
            { path: '/home/newslist', component: Newslist },
            { path: '/home/newsInfo/:id', component: Newsinfo },
            { path: '/home/newsInfoComment/:id', component: NewsinfoComment },
            { path: '/home/photoList', component: PhotoList }
        ],
        linkActiveClass: 'mui-active'
    })
    //把 路由对象 暴露出去
export default router